/**
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-17 15:16:58
 * Copyright (c) 2015- -版权所有
 */

package com.joysuch.wwyt.edu.bean;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.joysuch.wwyt.core.bean.BaseAttachmentBean;
import com.joysuch.wwyt.core.bean.CourseBean;
import com.joysuch.wwyt.edu.entity.EduCourse;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.validation.constraints.Pattern;
import java.util.List;

@Data
public class EduTrainningRecordEditBean implements java.io.Serializable {

    // columns START

    // ID
    private Long id;

    // 编码
    //@NotNull(field = "编码")
    @Length(max = 10)
    private String code;

    // 计划ID
//    @NotNull(message = "请选择培训计划")
    private Long trainningPlanId;

    // 培训类型ID
    @NotNull(message = "请选择培训类型")
    private Long trainningTypeId;

    // 培训学时
    @NotNull(message = "请填写培训学时")
    private Double lessons;

    // 培训日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private java.util.Date trainningDate;

    //培训结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private java.util.Date trainningEndDate;

    // 培训地点
    @Length(max = 64)
    private String trainningPlace;

    // 培训单位ID
    private Long trainningDepartId;

    // 培训讲师ID
    private Long trainningTeacherId;

    // 考核单位ID
    private Long assessDepartId;

    // 培训费用
    private Double cost;

    // 培训简介
    @Length(max = 512)
    private String introduction;

    // 是否有考试
    @Length(max = 2)
    private String hasExam;

    // 考试ID
    private Long examId;

    // 是否有证书
    @Length(max = 2)
    private String hasCert;

    // 证书ID
    private Long certId;
    // columns END

    // 现场图片
    private List<BaseAttachmentBean> images;
    // 参与人员
    private List<EduTrainningRecordUserEditBean> users;
    // 此次被删除的参与人员
    private List<Long> deleteIds;

    @Pattern(regexp = "[JUD]", message = "参与对象类型只能为U(用户),D(部门),J(岗位)")
    private String joinInOrgType;
    // 参与对象ID（岗位、部门、人员
    private List<Long> joinInTargetIds;

    //责任部门
    private Integer responsibleDept;

    //培训名称
    @Length(max = 64)
    private String trainingName;

    private List<BaseAttachmentBean> attachments;

    //是否开启人脸识别 0关闭 1开启
    private Integer openFace;

    //培训形式 0线下1线上
    @NotNull(message = "请选择培训形式")
    private Integer trainingForm;

    //课程
    private List<Long> courseBeans;

    //是否需要签到0否1是
    private Integer hasSignIn;

    //培训合格标准 0 完成签到，1手动录入，2考试通过，3学完课程，4学完课程+考试通过，5完成签到+考试通过
    private Integer trainingQualifiedStandard;

    //考试模式 1 自由考试 2 先学再考
    private Integer examMode;
}
